# 打开浏览器
import time

from selenium import webdriver
from selenium.webdriver.common.by import By

driver = webdriver.Chrome()
# .get方法访问URL
driver.get("http://121.43.169.97:8848/pageA.html")

# 用元素属性class定位
# 语法： 浏览器对象.find_element(by=By.CLASS_NAME,value="class属性值")
# 在value="emailA dzyxA"中不能填写两个，只能选其一
# driver.find_element(by=By.CLASS_NAME,value="emailA dzyxA").send_keys("1900457926@qq.com")
# driver.find_element(by=By.CLASS_NAME,value="emailA").send_keys("1900457926@qq.com")
driver.find_element(by=By.CLASS_NAME, value="dzyxA").send_keys("1900457926@qq.com")
# 定位输入后暂停5秒
time.sleep(5)
# 关闭浏览器
driver.quit()


